home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-1.iso / Files / Tele / C / Comet2.1.3.sit / 3270XCMD / How to make XCMDs < prev    next >
MacBinary  |  1989-08-18  |  10.3 KB  |  [TEXT/MACA]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Fri Aug 18 15:33:52 1989, modified Fri Aug 18 15:33:52 1989, creator MacWrite, type ASCII, 9922 bytes "How to make XCMDs" , at 0x2742 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MACA]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 11 48 6f 77 20 74 6f | 20 6d 61 6b 65 20 58 43 |..How to| make XC|
|00000010| 4d 44 73 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |MDs.....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 41 43 | 41 00 00 00 00 00 00 00 |.TEXTMAC|A.......|
|00000050| 00 00 00 00 00 26 c2 00 | 00 01 7e a1 12 15 20 a1 |.....&..|..~... .|
|00000060| 12 15 20 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.. .....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 0e e2 00 00 |........|........|
|00000080| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 58 | 43 4d 44 20 61 6e 64 20 |.......X|CMD and |
|000000c0| 58 46 43 4e 3a 20 54 68 | 65 20 4d 61 67 69 63 20 |XFCN: Th|e Magic |
|000000d0| 48 6f 6f 6b 73 20 54 68 | 61 74 20 45 78 74 65 6e |Hooks Th|at Exten|
|000000e0| 64 20 48 79 70 65 72 54 | 61 6c 6b 0d 0d 0d 0d 54 |d HyperT|alk....T|
|000000f0| 68 69 73 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |his docu|mentatio|
|00000100| 6e 20 62 79 20 54 65 64 | 20 4b 61 65 68 6c 65 72 |n by Ted| Kaehler|
|00000110| 2c 20 31 20 41 75 67 75 | 73 74 20 31 39 38 37 0d |, 1 Augu|st 1987.|
|00000120| 0d 46 6f 72 20 48 79 70 | 65 72 43 61 72 64 20 31 |.For Hyp|erCard 1|
|00000130| 2e 30 2e 31 0d 0d a9 41 | 70 70 6c 65 20 43 6f 6d |.0.1...A|pple Com|
|00000140| 70 75 74 65 72 2c 20 49 | 6e 63 2e 20 31 39 38 37 |puter, I|nc. 1987|
|00000150| 0d 0d 41 6c 6c 20 52 69 | 67 68 74 73 20 52 65 73 |..All Ri|ghts Res|
|00000160| 65 72 76 65 64 2e 0d 0d | 0d 0d 44 61 6e 20 57 69 |erved...|..Dan Wi|
|00000170| 6e 6b 6c 65 72 20 68 61 | 73 20 63 72 65 61 74 65 |nkler ha|s create|
|00000180| 64 20 61 6e 20 69 6e 74 | 65 72 66 61 63 65 20 74 |d an int|erface t|
|00000190| 68 61 74 20 61 6c 6c 6f | 77 73 20 70 6f 77 65 72 |hat allo|ws power|
|000001a0| 66 75 6c 20 6e 65 77 20 | 63 6f 6d 6d 61 6e 64 73 |ful new |commands|
|000001b0| 0d 74 6f 20 62 65 20 61 | 64 64 65 64 20 74 6f 20 |.to be a|dded to |
|000001c0| 48 79 70 65 72 43 61 72 | 64 20 22 69 6e 20 74 68 |HyperCar|d "in th|
|000001d0| 65 20 66 69 65 6c 64 2e | 22 20 20 57 68 65 6e 20 |e field.|" When |
|000001e0| 61 20 63 6f 6d 6d 61 6e | 64 20 69 6e 20 61 20 73 |a comman|d in a s|
|000001f0| 63 72 69 70 74 20 63 61 | 6e 6e 6f 74 0d 62 65 20 |cript ca|nnot.be |
|00000200| 66 6f 75 6e 64 2c 20 48 | 79 70 65 72 43 61 72 64 |found, H|yperCard|
|00000210| 20 6c 6f 6f 6b 73 20 66 | 6f 72 20 61 20 72 65 73 | looks f|or a res|
|00000220| 6f 75 72 63 65 20 6f 66 | 20 74 79 70 65 20 58 43 |ource of| type XC|
|00000230| 4d 44 20 77 69 74 68 20 | 74 68 65 20 73 61 6d 65 |MD with |the same|
|00000240| 20 6e 61 6d 65 0d 61 73 | 20 74 68 65 20 75 6e 6b | name.as| the unk|
|00000250| 6e 6f 77 6e 20 63 6f 6d | 6d 61 6e 64 2e 20 4c 69 |nown com|mand. Li|
|00000260| 6b 65 77 69 73 65 2c 20 | 77 68 65 6e 20 61 20 66 |kewise, |when a f|
|00000270| 75 6e 63 74 69 6f 6e 20 | 63 61 6e 6e 6f 74 20 62 |unction |cannot b|
|00000280| 65 20 66 6f 75 6e 64 2c | 0d 48 79 70 65 72 43 61 |e found,|.HyperCa|
|00000290| 72 64 20 6c 6f 6f 6b 73 | 20 66 6f 72 20 61 20 72 |rd looks| for a r|
|000002a0| 65 73 6f 75 72 63 65 20 | 6f 66 20 74 79 70 65 20 |esource |of type |
|000002b0| 58 46 43 4e 2e 20 57 68 | 65 6e 65 76 65 72 20 61 |XFCN. Wh|enever a|
|000002c0| 20 68 61 6e 64 6c 65 72 | 20 28 66 6f 72 20 61 0d | handler| (for a.|
|000002d0| 63 6f 6d 6d 61 6e 64 20 | 6f 72 20 66 75 6e 63 74 |command |or funct|
|000002e0| 69 6f 6e 29 20 69 73 20 | 6e 6f 74 20 66 6f 75 6e |ion) is |not foun|
|000002f0| 64 20 69 6e 20 61 20 73 | 74 61 63 6b 20 73 63 72 |d in a s|tack scr|
|00000300| 69 70 74 2c 20 48 79 70 | 65 72 43 61 72 64 0d 69 |ipt, Hyp|erCard.i|
|00000310| 6d 6d 65 64 69 61 74 65 | 6c 79 20 6c 6f 6f 6b 73 |mmediate|ly looks|
|00000320| 20 66 6f 72 20 61 6e 20 | 58 43 4d 44 20 6f 72 20 | for an |XCMD or |
|00000330| 58 46 43 4e 20 69 6e 20 | 74 68 61 74 20 73 74 61 |XFCN in |that sta|
|00000340| 63 6b 2e 20 20 54 68 65 | 20 74 6f 74 61 6c 20 69 |ck. The| total i|
|00000350| 6e 68 65 72 69 74 61 6e | 63 65 0d 6f 72 64 65 72 |nheritan|ce.order|
|00000360| 20 69 73 3a 0d 0d 0d 0d | 42 75 74 74 6f 6e 20 28 | is:....|Button (|
|00000370| 6f 72 20 46 69 65 6c 64 | 29 0d 0d 43 61 72 64 0d |or Field|)..Card.|
|00000380| 0d 53 74 61 63 6b 0d 0d | 73 74 61 63 6b 20 58 43 |.Stack..|stack XC|
|00000390| 4d 44 0d 0d 48 6f 6d 65 | 0d 0d 68 6f 6d 65 20 58 |MD..Home|..home X|
|000003a0| 43 4d 44 0d 0d 58 43 4d | 44 20 69 6e 20 48 79 70 |CMD..XCM|D in Hyp|
|000003b0| 65 72 43 61 72 64 20 61 | 70 70 6c 69 63 61 74 69 |erCard a|pplicati|
|000003c0| 6f 6e 20 66 69 6c 65 0d | 0d 48 79 70 65 72 43 61 |on file.|.HyperCa|
|000003d0| 72 64 20 63 6f 6d 6d 61 | 6e 64 0d 0d 0d 0d 41 6e |rd comma|nd....An|
|000003e0| 20 58 43 4d 44 20 6f 72 | 20 58 46 43 4e 20 69 73 | XCMD or| XFCN is|
|000003f0| 20 61 20 63 6f 64 65 20 | 72 65 73 6f 75 72 63 65 | a code |resource|
|00000400| 20 77 69 74 68 20 6e 6f | 20 68 65 61 64 65 72 20 | with no| header |
|00000410| 62 79 74 65 73 20 28 6a | 75 73 74 20 6c 69 6b 65 |bytes (j|ust like|
|00000420| 20 61 20 64 65 73 6b 0d | 61 63 63 65 73 73 6f 72 | a desk.|accessor|
|00000430| 79 29 2e 20 59 6f 75 20 | 63 61 6e 20 6d 6f 76 65 |y). You |can move|
|00000440| 20 74 68 65 6d 20 66 72 | 6f 6d 20 66 69 6c 65 20 | them fr|om file |
|00000450| 74 6f 20 66 69 6c 65 20 | 77 69 74 68 20 52 65 73 |to file |with Res|
|00000460| 45 64 69 74 20 6f 72 20 | 77 69 74 68 20 61 6e 79 |Edit or |with any|
|00000470| 0d 6f 74 68 65 72 20 72 | 65 73 6f 75 72 63 65 20 |.other r|esource |
|00000480| 6d 6f 76 69 6e 67 20 74 | 6f 6f 6c 2e 0d 0d 0d 0d |moving t|ool.....|
|00000490| 54 68 65 20 6f 6e 6c 79 | 20 74 68 69 6e 67 20 70 |The only| thing p|
|000004a0| 61 73 73 65 64 20 69 6e | 74 6f 20 61 6e 20 58 43 |assed in|to an XC|
|000004b0| 4d 44 20 6f 72 20 58 46 | 43 4e 20 69 73 20 61 20 |MD or XF|CN is a |
|000004c0| 70 6f 69 6e 74 65 72 20 | 74 6f 20 61 20 58 43 6d |pointer |to a XCm|
|000004d0| 64 42 6c 6f 63 6b 2e 20 | 20 49 74 0d 6c 6f 6f 6b |dBlock. | It.look|
|000004e0| 73 20 6c 69 6b 65 20 74 | 68 69 73 3a 0d 0d 0d 0d |s like t|his:....|
|000004f0| 58 43 6d 64 50 74 72 20 | 3d 20 5e 58 43 6d 64 42 |XCmdPtr |= ^XCmdB|
|00000500| 6c 6f 63 6b 3b 20 0d 0d | 58 43 6d 64 42 6c 6f 63 |lock; ..|XCmdBloc|
|00000510| 6b 20 3d 0d 20 20 20 52 | 45 43 4f 52 44 0d 20 20 |k =. R|ECORD. |
|00000520| 20 20 20 20 70 61 72 61 | 6d 43 6f 75 6e 74 3a 20 | para|mCount: |
|00000530| 49 4e 54 45 47 45 52 3b | 20 7b 20 74 68 65 20 6e |INTEGER;| { the n|
|00000540| 75 6d 62 65 72 20 6f 66 | 20 61 72 67 75 6d 65 6e |umber of| argumen|
|00000550| 74 73 7d 0d 20 20 20 20 | 20 20 70 61 72 61 6d 73 |ts}. | params|
|00000560| 3a 20 41 52 52 41 59 5b | 31 2e 2e 31 36 5d 20 4f |: ARRAY[|1..16] O|
|00000570| 46 20 48 61 6e 64 6c 65 | 3b 20 20 7b 20 74 68 65 |F Handle|; { the|
|00000580| 20 61 72 67 75 6d 65 6e | 74 73 7d 0d 20 20 20 20 | argumen|ts}. |
|00000590| 20 20 72 65 74 75 72 6e | 56 61 6c 75 65 3a 20 48 | return|Value: H|
|000005a0| 61 6e 64 6c 65 3b 20 7b | 20 74 68 65 20 72 65 73 |andle; {| the res|
|000005b0| 75 6c 74 20 6f 66 20 74 | 68 69 73 20 58 43 4d 44 |ult of t|his XCMD|
|000005c0| 7d 0d 20 20 20 20 20 20 | 70 61 73 73 46 6c 61 67 |}. |passFlag|
|000005d0| 3a 20 42 4f 4f 4c 45 41 | 4e 3b 20 7b 20 70 61 73 |: BOOLEA|N; { pas|
|000005e0| 73 20 74 68 65 20 6d 65 | 73 73 61 67 65 20 6f 6e |s the me|ssage on|
|000005f0| 3f 7d 0d 20 20 20 20 20 | 20 65 6e 74 72 79 50 6f |?}. | entryPo|
|00000600| 69 6e 74 3a 20 50 72 6f | 63 50 74 72 3b 20 7b 20 |int: Pro|cPtr; { |
|00000610| 63 61 6c 6c 20 62 61 63 | 6b 20 74 6f 20 48 79 70 |call bac|k to Hyp|
|00000620| 65 72 43 61 72 64 7d 0d | 20 20 20 20 20 20 72 65 |erCard}.| re|
|00000630| 71 75 65 73 74 3a 20 20 | 49 4e 54 45 47 45 52 3b |quest: |INTEGER;|
|00000640| 20 7b 20 77 68 61 74 20 | 79 6f 75 20 77 61 6e 74 | { what |you want|
|00000650| 20 74 6f 20 64 6f 7d 0d | 20 20 20 20 20 20 72 65 | to do}.| re|
|00000660| 73 75 6c 74 3a 20 49 4e | 54 45 47 45 52 3b 20 7b |sult: IN|TEGER; {|
|00000670| 20 74 68 65 20 61 6e 73 | 77 65 72 20 69 74 20 67 | the ans|wer it g|
|00000680| 69 76 65 73 7d 0d 20 20 | 20 20 20 20 69 6e 41 72 |ives}. | inAr|
|00000690| 67 73 3a 20 41 52 52 41 | 59 5b 31 2e 2e 38 5d 20 |gs: ARRA|Y[1..8] |
|000006a0| 4f 46 20 4c 6f 6e 67 49 | 6e 74 3b 20 20 7b 20 61 |OF LongI|nt; { a|
|000006b0| 72 67 73 20 58 43 4d 44 | 20 73 65 6e 64 73 20 48 |rgs XCMD| sends H|
|000006c0| 79 70 65 72 43 61 72 64 | 7d 0d 20 20 20 20 20 20 |yperCard|}. |
|000006d0| 6f 75 74 41 72 67 73 3a | 20 41 52 52 41 59 5b 31 |outArgs:| ARRAY[1|
|000006e0| 2e 2e 34 5d 20 4f 46 20 | 4c 6f 6e 67 49 6e 74 3b |..4] OF |LongInt;|
|000006f0| 20 20 7b 20 61 6e 73 77 | 65 72 20 48 79 70 65 72 | { answ|er Hyper|
|00000700| 43 61 72 64 20 73 65 6e | 64 73 20 62 61 63 6b 7d |Card sen|ds back}|
|00000710| 0d 20 20 20 45 4e 44 3b | 0d 0d 0d 0d 59 6f 75 20 |. END;|....You |
|00000720| 72 65 61 64 20 74 68 65 | 20 61 72 67 75 6d 65 6e |read the| argumen|
|00000730| 74 73 20 28 74 68 65 79 | 20 61 72 65 20 68 61 6e |ts (they| are han|
|00000740| 64 6c 65 73 20 74 6f 20 | 7a 65 72 6f 20 74 65 72 |dles to |zero ter|
|00000750| 6d 69 6e 61 74 65 64 20 | 73 74 72 69 6e 67 73 29 |minated |strings)|
|00000760| 2c 20 64 6f 0d 77 68 61 | 74 65 76 65 72 20 74 68 |, do.wha|tever th|
|00000770| 65 20 70 75 72 70 6f 73 | 65 20 6f 66 20 74 68 69 |e purpos|e of thi|
|00000780| 73 20 58 43 4d 44 20 69 | 73 2c 20 61 6e 64 20 6f |s XCMD i|s, and o|
|00000790| 70 74 69 6f 6e 61 6c 6c | 79 20 73 74 6f 72 65 20 |ptionall|y store |
|000007a0| 61 20 72 65 73 75 6c 74 | 20 69 6e 74 6f 0d 72 65 |a result| into.re|
|000007b0| 74 75 72 6e 56 61 6c 75 | 65 2e 20 41 6c 6c 20 64 |turnValu|e. All d|
|000007c0| 61 74 61 20 76 61 6c 75 | 65 73 20 67 6f 69 6e 67 |ata valu|es going|
|000007d0| 20 74 6f 20 61 6e 64 20 | 66 72 6f 6d 20 48 79 70 | to and |from Hyp|
|000007e0| 65 72 54 61 6c 6b 20 61 | 72 65 0d 7a 65 72 6f 2d |erTalk a|re.zero-|
|000007f0| 74 65 72 6d 69 6e 61 74 | 65 64 20 41 53 43 49 49 |terminat|ed ASCII|
|00000800| 20 73 74 72 69 6e 67 73 | 0d 0d 52 65 73 6f 75 72 | strings|..Resour|
|00000810| 63 65 73 20 6f 66 20 74 | 79 70 65 20 58 43 4d 44 |ces of t|ype XCMD|
|00000820| 20 61 72 65 20 63 6f 6d | 6d 61 6e 64 73 2c 20 61 | are com|mands, a|
|00000830| 6e 64 20 72 65 73 6f 75 | 72 63 65 73 20 6f 66 20 |nd resou|rces of |
|00000840| 74 79 70 65 20 58 46 43 | 4e 20 61 72 65 0d 66 75 |type XFC|N are.fu|
|00000850| 6e 63 74 69 6f 6e 73 20 | 74 68 61 74 20 72 65 74 |nctions |that ret|
|00000860| 75 72 6e 20 61 20 76 61 | 6c 75 65 2e 20 49 66 20 |urn a va|lue. If |
|00000870| 79 6f 75 20 73 74 6f 72 | 65 20 61 20 72 65 73 75 |you stor|e a resu|
|00000880| 6c 74 20 73 74 72 69 6e | 67 20 69 6e 74 6f 20 72 |lt strin|g into r|
|00000890| 65 74 75 72 6e 56 61 6c | 75 65 0d 69 6e 20 61 20 |eturnVal|ue.in a |
|000008a0| 63 6f 6d 6d 61 6e 64 2c | 20 74 68 65 20 75 73 65 |command,| the use|
|000008b0| 72 20 63 61 6e 20 67 65 | 74 20 69 74 20 62 79 20 |r can ge|t it by |
|000008c0| 61 73 6b 69 6e 67 20 66 | 6f 72 20 22 74 68 65 20 |asking f|or "the |
|000008d0| 72 65 73 75 6c 74 22 20 | 28 75 73 65 66 75 6c 20 |result" |(useful |
|000008e0| 66 6f 72 0d 65 78 70 6c | 61 69 6e 69 6e 67 20 77 |for.expl|aining w|
|000008f0| 68 79 20 74 68 65 72 65 | 20 77 61 73 20 61 6e 20 |hy there| was an |
|00000900| 65 72 72 6f 72 29 2e 20 | 20 49 6e 20 61 20 66 75 |error). | In a fu|
|00000910| 6e 63 74 69 6f 6e 2c 20 | 79 6f 75 20 61 72 65 20 |nction, |you are |
|00000920| 65 78 70 65 63 74 65 64 | 20 74 6f 0d 73 74 6f 72 |expected| to.stor|
|00000930| 65 20 74 68 65 20 61 6e | 73 77 65 72 20 69 6e 74 |e the an|swer int|
|00000940| 6f 20 72 65 74 75 72 6e | 56 61 6c 75 65 2e 20 49 |o return|Value. I|
|00000950| 66 20 79 6f 75 20 64 6f | 6e 27 74 20 73 74 6f 72 |f you do|n't stor|
|00000960| 65 20 61 6e 79 74 68 69 | 6e 67 2c 20 74 68 65 20 |e anythi|ng, the |
|00000970| 72 65 73 75 6c 74 20 69 | 73 0d 74 68 65 20 65 6d |result i|s.the em|
|00000980| 70 74 79 20 73 74 72 69 | 6e 67 2e 0d 0d 49 66 20 |pty stri|ng...If |
|00000990| 70 61 73 73 46 6c 61 67 | 20 69 73 20 66 61 6c 73 |passFlag| is fals|
|000009a0| 65 20 28 74 68 65 20 6e | 6f 72 6d 61 6c 20 63 61 |e (the n|ormal ca|
|000009b0| 73 65 29 2c 20 74 68 69 | 73 20 58 43 4d 44 20 6f |se), thi|s XCMD o|
|000009c0| 72 20 58 46 43 4e 20 68 | 61 73 20 68 61 6e 64 6c |r XFCN h|as handl|
|000009d0| 65 64 20 74 68 65 0d 6d | 65 73 73 61 67 65 20 61 |ed the.m|essage a|
|000009e0| 6e 64 20 74 68 65 20 73 | 63 72 69 70 74 20 72 65 |nd the s|cript re|
|000009f0| 73 75 6d 65 73 20 65 78 | 65 63 75 74 69 6f 6e 2e |sumes ex|ecution.|
|00000a00| 20 49 66 20 70 61 73 73 | 46 6c 61 67 20 69 73 20 | If pass|Flag is |
|00000a10| 74 72 75 65 2c 20 48 79 | 70 65 72 43 61 72 64 0d |true, Hy|perCard.|
|00000a20| 73 65 61 72 63 68 65 73 | 20 74 68 65 20 72 65 6d |searches| the rem|
|00000a30| 61 69 6e 69 6e 67 20 69 | 6e 68 65 72 69 74 61 6e |aining i|nheritan|
|00000a40| 63 65 20 63 68 61 69 6e | 20 66 6f 72 20 61 6e 6f |ce chain| for ano|
|00000a50| 74 68 65 72 20 68 61 6e | 64 6c 65 72 20 6f 72 20 |ther han|dler or |
|00000a60| 58 43 4d 44 20 77 69 74 | 68 0d 74 68 65 20 73 61 |XCMD wit|h.the sa|
|00000a70| 6d 65 20 6e 61 6d 65 2e | 20 54 68 69 73 20 69 73 |me name.| This is|
|00000a80| 20 6a 75 73 74 20 6c 69 | 6b 65 20 74 68 65 20 22 | just li|ke the "|
|00000a90| 70 61 73 73 22 20 63 6f | 6e 74 72 6f 6c 20 73 74 |pass" co|ntrol st|
|00000aa0| 72 75 63 74 75 72 65 20 | 69 6e 20 61 20 73 63 72 |ructure |in a scr|
|00000ab0| 69 70 74 2e 0d 0d 54 68 | 65 20 66 69 6c 65 20 46 |ipt...Th|e file F|
|00000ac0| 6c 61 73 68 2e 70 20 69 | 73 20 61 6e 20 65 78 61 |lash.p i|s an exa|
|00000ad0| 6d 70 6c 65 20 58 43 4d | 44 2e 20 49 74 20 74 61 |mple XCM|D. It ta|
|00000ae0| 6b 65 73 20 6f 6e 65 20 | 61 72 67 75 6d 65 6e 74 |kes one |argument|
|00000af0| 20 77 68 69 63 68 20 69 | 73 20 74 68 65 0d 41 53 | which i|s the.AS|
|00000b00| 43 49 49 20 63 68 61 72 | 61 63 74 65 72 73 20 66 |CII char|acters f|
|00000b10| 6f 72 20 61 20 64 65 63 | 69 6d 61 6c 20 69 6e 74 |or a dec|imal int|
|00000b20| 65 67 65 72 2e 20 49 74 | 20 69 6e 76 65 72 74 73 |eger. It| inverts|
|00000b30| 20 74 68 65 20 73 63 72 | 65 65 6e 20 74 77 69 63 | the scr|een twic|
|00000b40| 65 20 74 68 65 0d 6e 75 | 6d 62 65 72 20 6f 66 20 |e the.nu|mber of |
|00000b50| 74 69 6d 65 73 20 69 6e | 64 69 63 61 74 65 64 2e |times in|dicated.|
|00000b60| 20 0d 0d 50 65 65 6b 2e | 70 20 69 73 20 61 20 66 | ..Peek.|p is a f|
|00000b70| 75 6e 63 74 69 6f 6e 20 | 28 58 46 43 4e 29 20 74 |unction |(XFCN) t|
|00000b80| 68 61 74 20 72 65 74 75 | 72 6e 73 20 74 68 65 20 |hat retu|rns the |
|00000b90| 76 61 6c 75 65 20 6f 66 | 20 61 6e 79 20 6d 65 6d |value of| any mem|
|00000ba0| 6f 72 79 20 6c 6f 63 61 | 74 69 6f 6e 0d 69 6e 20 |ory loca|tion.in |
|00000bb0| 74 68 65 20 6d 61 63 68 | 69 6e 65 20 28 70 75 72 |the mach|ine (pur|
|00000bc0| 69 73 74 73 20 61 76 65 | 72 74 20 79 6f 75 72 20 |ists ave|rt your |
|00000bd0| 65 79 65 73 29 2e 0d 0d | 54 68 65 20 73 65 63 6f |eyes)...|The seco|
|00000be0| 6e 64 20 70 61 72 74 20 | 6f 66 20 74 68 65 20 58 |nd part |of the X|
|00000bf0| 43 6d 64 42 6c 6f 63 6b | 20 72 65 63 6f 72 64 20 |CmdBlock| record |
|00000c00| 68 61 73 20 74 6f 20 64 | 6f 20 77 69 74 68 20 63 |has to d|o with c|
|00000c10| 61 6c 6c 69 6e 67 20 48 | 79 70 65 72 43 61 72 64 |alling H|yperCard|
|00000c20| 0d 62 61 63 6b 20 69 6e | 20 74 68 65 20 6d 69 64 |.back in| the mid|
|00000c30| 64 6c 65 20 6f 66 20 79 | 6f 75 72 20 63 6f 64 65 |dle of y|our code|
|00000c40| 20 74 6f 20 61 73 6b 20 | 61 20 71 75 65 73 74 69 | to ask |a questi|
|00000c50| 6f 6e 2e 20 49 66 20 79 | 6f 75 20 77 61 6e 74 65 |on. If y|ou wante|
|00000c60| 64 20 74 6f 20 6d 61 6e | 61 67 65 0d 74 68 65 20 |d to man|age.the |
|00000c70| 63 61 6c 6c 20 74 6f 20 | 48 79 70 65 72 43 61 72 |call to |HyperCar|
|00000c80| 64 20 79 6f 75 72 73 65 | 6c 66 2c 20 79 6f 75 20 |d yourse|lf, you |
|00000c90| 77 6f 75 6c 64 20 66 69 | 6c 6c 20 69 6e 41 72 67 |would fi|ll inArg|
|00000ca0| 73 20 77 69 74 68 20 79 | 6f 75 72 20 61 72 67 75 |s with y|our argu|
|00000cb0| 6d 65 6e 74 73 2c 0d 70 | 75 74 20 61 20 72 65 71 |ments,.p|ut a req|
|00000cc0| 75 65 73 74 20 63 6f 64 | 65 20 69 6e 20 72 65 71 |uest cod|e in req|
|00000cd0| 75 65 73 74 2c 20 61 6e | 64 20 4a 53 52 20 74 6f |uest, an|d JSR to|
|00000ce0| 20 74 68 65 20 61 64 64 | 72 65 73 73 20 69 6e 20 | the add|ress in |
|00000cf0| 65 6e 74 72 79 50 6f 69 | 6e 74 2e 0d 48 79 70 65 |entryPoi|nt..Hype|
|00000d00| 72 43 61 72 64 20 72 65 | 74 75 72 6e 73 20 74 68 |rCard re|turns th|
|00000d10| 65 20 76 61 6c 75 65 73 | 20 79 6f 75 20 72 65 71 |e values| you req|
|00000d20| 75 65 73 74 65 64 20 69 | 6e 20 6f 75 74 41 72 67 |uested i|n outArg|
|00000d30| 73 20 61 6e 64 20 61 20 | 72 65 73 75 6c 74 20 63 |s and a |result c|
|00000d40| 6f 64 65 20 69 6e 0d 72 | 65 73 75 6c 74 2e 0d 0d |ode in.r|esult...|
|00000d50| 44 61 6e 20 57 69 6e 6b | 6c 65 72 20 68 61 73 20 |Dan Wink|ler has |
|00000d60| 70 61 63 6b 61 67 65 64 | 20 74 68 65 20 65 6e 74 |packaged| the ent|
|00000d70| 69 72 65 20 72 61 6e 67 | 65 20 6f 66 20 63 61 6c |ire rang|e of cal|
|00000d80| 6c 73 20 6f 6e 20 48 79 | 70 65 72 43 61 72 64 2c |ls on Hy|perCard,|
|00000d90| 20 73 6f 20 74 68 61 74 | 20 69 66 0d 79 6f 75 20 | so that| if.you |
|00000da0| 61 72 65 20 75 73 69 6e | 67 20 50 61 73 63 61 6c |are usin|g Pascal|
|00000db0| 2c 20 79 6f 75 20 63 61 | 6e 20 73 69 6d 70 6c 79 |, you ca|n simply|
|00000dc0| 20 63 61 6c 6c 20 61 20 | 70 72 6f 63 65 64 75 72 | call a |procedur|
|00000dd0| 65 2e 20 42 6f 74 68 20 | 50 65 65 6b 20 61 6e 64 |e. Both |Peek and|
|00000de0| 20 46 6c 61 73 68 0d 75 | 73 65 20 73 6f 6d 65 20 | Flash.u|se some |
|00000df0| 63 6f 6e 76 65 72 73 69 | 6f 6e 20 72 6f 75 74 69 |conversi|on routi|
|00000e00| 6e 65 73 20 74 68 61 74 | 20 44 61 6e 20 68 61 73 |nes that| Dan has|
|00000e10| 20 6b 69 6e 64 6c 79 20 | 73 75 70 70 6c 69 65 64 | kindly |supplied|
|00000e20| 2e 20 54 68 65 20 66 69 | 6c 65 0d 58 43 6d 64 47 |. The fi|le.XCmdG|
|00000e30| 6c 75 65 2e 69 6e 63 20 | 68 61 73 20 74 68 65 20 |lue.inc |has the |
|00000e40| 67 6c 75 65 20 70 72 6f | 63 65 64 75 72 65 73 2e |glue pro|cedures.|
|00000e50| 20 48 61 6e 64 6c 65 20 | 69 73 20 61 6c 77 61 79 | Handle |is alway|
|00000e60| 73 20 61 20 68 61 6e 64 | 6c 65 20 74 6f 20 61 0d |s a hand|le to a.|
|00000e70| 7a 65 72 6f 2d 74 65 72 | 6d 69 6e 61 74 65 64 20 |zero-ter|minated |
|00000e80| 73 74 72 69 6e 67 2e 20 | 49 66 20 61 20 68 61 6e |string. |If a han|
|00000e90| 64 6c 65 20 69 73 20 72 | 65 74 75 72 6e 65 64 2c |dle is r|eturned,|
|00000ea0| 20 79 6f 75 20 61 72 65 | 20 72 65 73 70 6f 6e 73 | you are| respons|
|00000eb0| 69 62 6c 65 20 66 6f 72 | 0d 64 69 73 70 6f 73 69 |ible for|.disposi|
|00000ec0| 6e 67 20 69 74 2e 20 54 | 68 65 20 63 61 6c 6c 73 |ng it. T|he calls|
|00000ed0| 20 61 72 65 3a 0d 0d 0d | 0d 50 52 4f 43 45 44 55 | are:...|.PROCEDU|
|00000ee0| 52 45 20 53 65 6e 64 43 | 61 72 64 4d 65 73 73 61 |RE SendC|ardMessa|
|00000ef0| 67 65 28 6d 73 67 3a 20 | 53 74 72 32 35 35 29 3b |ge(msg: |Str255);|
|00000f00| 0d 0d 7b 53 65 6e 64 20 | 61 20 48 79 70 65 72 43 |..{Send |a HyperC|
|00000f10| 61 72 64 20 6d 65 73 73 | 61 67 65 20 28 61 20 63 |ard mess|age (a c|
|00000f20| 6f 6d 6d 61 6e 64 20 77 | 69 74 68 20 61 72 67 75 |ommand w|ith argu|
|00000f30| 6d 65 6e 74 73 29 20 74 | 6f 20 74 68 65 20 63 75 |ments) t|o the cu|
|00000f40| 72 72 65 6e 74 0d 63 61 | 72 64 2e 7d 20 0d 0d 0d |rrent.ca|rd.} ...|
|00000f50| 0d 46 55 4e 43 54 49 4f | 4e 20 45 76 61 6c 45 78 |.FUNCTIO|N EvalEx|
|00000f60| 70 72 28 65 78 70 72 3a | 20 53 74 72 32 35 35 29 |pr(expr:| Str255)|
|00000f70| 3a 20 48 61 6e 64 6c 65 | 3b 0d 0d 7b 45 76 61 6c |: Handle|;..{Eval|
|00000f80| 75 61 74 65 20 61 20 48 | 79 70 65 72 43 61 72 64 |uate a H|yperCard|
|00000f90| 20 65 78 70 72 65 73 73 | 69 6f 6e 20 61 6e 64 20 | express|ion and |
|00000fa0| 72 65 74 75 72 6e 20 74 | 68 65 20 61 6e 73 77 65 |return t|he answe|
|00000fb0| 72 2e 20 54 68 65 20 61 | 6e 73 77 65 72 20 69 73 |r. The a|nswer is|
|00000fc0| 20 61 0d 68 61 6e 64 6c | 65 20 74 6f 20 61 20 7a | a.handl|e to a z|
|00000fd0| 65 72 6f 2d 74 65 72 6d | 69 6e 61 74 65 64 20 73 |ero-term|inated s|
|00000fe0| 74 72 69 6e 67 2e 7d 0d | 0d 0d 0d 46 55 4e 43 54 |tring.}.|...FUNCT|
|00000ff0| 49 4f 4e 20 53 74 72 69 | 6e 67 4c 65 6e 67 74 68 |ION Stri|ngLength|
|00001000| 28 73 74 72 50 74 72 3a | 20 50 74 72 29 3a 20 4c |(strPtr:| Ptr): L|
|00001010| 6f 6e 67 49 6e 74 3b 0d | 0d 7b 43 6f 75 6e 74 20 |ongInt;.|.{Count |
|00001020| 74 68 65 20 63 68 61 72 | 61 63 74 65 72 73 20 66 |the char|acters f|
|00001030| 72 6f 6d 20 77 68 65 72 | 65 20 73 74 72 50 74 72 |rom wher|e strPtr|
|00001040| 20 70 6f 69 6e 74 73 20 | 75 6e 74 69 6c 20 74 68 | points |until th|
|00001050| 65 20 6e 65 78 74 20 7a | 65 72 6f 20 62 79 74 65 |e next z|ero byte|
|00001060| 2e 0d 44 6f 65 73 20 6e | 6f 74 20 63 6f 75 6e 74 |..Does n|ot count|
|00001070| 20 74 68 65 20 7a 65 72 | 6f 20 69 74 73 65 6c 66 | the zer|o itself|
|00001080| 2e 20 73 74 72 50 74 72 | 20 6d 75 73 74 20 62 65 |. strPtr| must be|
|00001090| 20 61 20 7a 65 72 6f 2d | 74 65 72 6d 69 6e 61 74 | a zero-|terminat|
|000010a0| 65 64 20 73 74 72 69 6e | 67 2e 7d 0d 0d 0d 0d 46 |ed strin|g.}....F|
|000010b0| 55 4e 43 54 49 4f 4e 20 | 53 74 72 69 6e 67 4d 61 |UNCTION |StringMa|
|000010c0| 74 63 68 28 70 61 74 74 | 65 72 6e 3a 20 53 74 72 |tch(patt|ern: Str|
|000010d0| 32 35 35 3b 20 74 61 72 | 67 65 74 3a 20 50 74 72 |255; tar|get: Ptr|
|000010e0| 29 3a 20 50 74 72 3b 0d | 0d 7b 50 65 72 66 6f 72 |): Ptr;.|.{Perfor|
|000010f0| 6d 20 63 61 73 65 2d 69 | 6e 73 65 6e 73 69 74 69 |m case-i|nsensiti|
|00001100| 76 65 20 6d 61 74 63 68 | 20 6c 6f 6f 6b 69 6e 67 |ve match| looking|
|00001110| 20 66 6f 72 20 70 61 74 | 74 65 72 6e 20 61 6e 79 | for pat|tern any|
|00001120| 77 68 65 72 65 20 69 6e | 20 20 74 61 72 67 65 74 |where in| target|
|00001130| 2c 0d 72 65 74 75 72 6e | 69 6e 67 20 61 20 70 6f |,.return|ing a po|
|00001140| 69 6e 74 65 72 20 74 6f | 20 66 69 72 73 74 20 63 |inter to| first c|
|00001150| 68 61 72 61 63 74 65 72 | 20 6f 66 20 74 68 65 20 |haracter| of the |
|00001160| 66 69 72 73 74 20 6d 61 | 74 63 68 2c 20 20 69 6e |first ma|tch, in|
|00001170| 20 74 61 72 67 65 74 20 | 6f 72 20 4e 49 4c 0d 69 | target |or NIL.i|
|00001180| 66 20 6e 6f 20 6d 61 74 | 63 68 20 66 6f 75 6e 64 |f no mat|ch found|
|00001190| 2e 20 70 61 74 74 65 72 | 6e 20 69 73 20 61 20 50 |. patter|n is a P|
|000011a0| 61 73 63 61 6c 20 73 74 | 72 69 6e 67 2c 20 20 61 |ascal st|ring, a|
|000011b0| 6e 64 20 74 61 72 67 65 | 74 20 69 73 20 61 0d 7a |nd targe|t is a.z|
|000011c0| 65 72 6f 2d 74 65 72 6d | 69 6e 61 74 65 64 20 73 |ero-term|inated s|
|000011d0| 74 72 69 6e 67 2e 7d 0d | 0d 0d 0d 50 52 4f 43 45 |tring.}.|...PROCE|
|000011e0| 44 55 52 45 20 53 65 6e | 64 48 43 4d 65 73 73 61 |DURE Sen|dHCMessa|
|000011f0| 67 65 28 6d 73 67 3a 20 | 53 74 72 32 35 35 29 3b |ge(msg: |Str255);|
|00001200| 0d 0d 7b 53 65 6e 64 20 | 61 20 48 79 70 65 72 43 |..{Send |a HyperC|
|00001210| 61 72 64 20 6d 65 73 73 | 61 67 65 20 28 61 20 63 |ard mess|age (a c|
|00001220| 6f 6d 6d 61 6e 64 20 77 | 69 74 68 20 61 72 67 75 |ommand w|ith argu|
|00001230| 6d 65 6e 74 73 29 20 74 | 6f 20 48 79 70 65 72 43 |ments) t|o HyperC|
|00001240| 61 72 64 2e 7d 0d 0d 0d | 0d 50 52 4f 43 45 44 55 |ard.}...|.PROCEDU|
|00001250| 52 45 20 5a 65 72 6f 42 | 79 74 65 73 28 64 73 74 |RE ZeroB|ytes(dst|
|00001260| 50 74 72 3a 20 50 74 72 | 3b 20 6c 6f 6e 67 43 6f |Ptr: Ptr|; longCo|
|00001270| 75 6e 74 3a 20 4c 6f 6e | 67 49 6e 74 29 3b 0d 0d |unt: Lon|gInt);..|
|00001280| 7b 57 72 69 74 65 20 7a | 65 72 6f 73 20 69 6e 74 |{Write z|eros int|
|00001290| 6f 20 6d 65 6d 6f 72 79 | 20 73 74 61 72 74 69 6e |o memory| startin|
|000012a0| 67 20 61 74 20 64 73 74 | 50 74 72 20 61 6e 64 20 |g at dst|Ptr and |
|000012b0| 67 6f 69 6e 67 20 66 6f | 72 20 6c 6f 6e 67 43 6f |going fo|r longCo|
|000012c0| 75 6e 74 0d 6e 75 6d 62 | 65 72 20 6f 66 20 62 79 |unt.numb|er of by|
|000012d0| 74 65 73 2e 7d 0d 0d 0d | 0d 46 55 4e 43 54 49 4f |tes.}...|.FUNCTIO|
|000012e0| 4e 20 50 61 73 54 6f 5a | 65 72 6f 28 73 74 72 3a |N PasToZ|ero(str:|
|000012f0| 20 53 74 72 32 35 35 29 | 3a 20 48 61 6e 64 6c 65 | Str255)|: Handle|
|00001300| 3b 0d 0d 7b 43 6f 6e 76 | 65 72 74 20 61 20 50 61 |;..{Conv|ert a Pa|
|00001310| 73 63 61 6c 20 73 74 72 | 69 6e 67 20 74 6f 20 61 |scal str|ing to a|
|00001320| 20 7a 65 72 6f 2d 74 65 | 72 6d 69 6e 61 74 65 64 | zero-te|rminated|
|00001330| 20 73 74 72 69 6e 67 2e | 20 52 65 74 75 72 6e 73 | string.| Returns|
|00001340| 20 61 20 68 61 6e 64 6c | 65 20 74 6f 20 61 0d 6e | a handl|e to a.n|
|00001350| 65 77 20 7a 65 72 6f 2d | 74 65 72 6d 69 6e 61 74 |ew zero-|terminat|
|00001360| 65 64 20 73 74 72 69 6e | 67 2e 20 54 68 65 20 63 |ed strin|g. The c|
|00001370| 61 6c 6c 65 72 20 6d 75 | 73 74 20 64 69 73 70 6f |aller mu|st dispo|
|00001380| 73 65 20 74 68 65 20 68 | 61 6e 64 6c 65 2e 7d 0d |se the h|andle.}.|
|00001390| 0d 0d 0d 50 52 4f 43 45 | 44 55 52 45 20 5a 65 72 |...PROCE|DURE Zer|
|000013a0| 6f 54 6f 50 61 73 28 7a | 65 72 6f 53 74 72 3a 20 |oToPas(z|eroStr: |
|000013b0| 50 74 72 3b 20 56 41 52 | 20 70 61 73 53 74 72 3a |Ptr; VAR| pasStr:|
|000013c0| 20 53 74 72 32 35 35 29 | 3b 0d 0d 7b 46 69 6c 6c | Str255)|;..{Fill|
|000013d0| 20 74 68 65 20 50 61 73 | 63 61 6c 20 73 74 72 69 | the Pas|cal stri|
|000013e0| 6e 67 20 77 69 74 68 20 | 74 68 65 20 63 6f 6e 74 |ng with |the cont|
|000013f0| 65 6e 74 73 20 6f 66 20 | 74 68 65 20 7a 65 72 6f |ents of |the zero|
|00001400| 2d 74 65 72 6d 69 6e 61 | 74 65 64 20 73 74 72 69 |-termina|ted stri|
|00001410| 6e 67 2e 20 59 6f 75 0d | 63 72 65 61 74 65 20 74 |ng. You.|create t|
|00001420| 68 65 20 50 61 73 63 61 | 6c 20 73 74 72 69 6e 67 |he Pasca|l string|
|00001430| 20 61 6e 64 20 70 61 73 | 73 20 69 74 20 69 6e 20 | and pas|s it in |
|00001440| 61 73 20 61 20 56 41 52 | 20 70 61 72 61 6d 65 74 |as a VAR| paramet|
|00001450| 65 72 2e 20 55 73 65 66 | 75 6c 20 66 6f 72 0d 63 |er. Usef|ul for.c|
|00001460| 6f 6e 76 65 72 74 69 6e | 67 20 74 68 65 20 61 72 |onvertin|g the ar|
|00001470| 67 75 6d 65 6e 74 73 20 | 6f 66 20 61 6e 79 20 58 |guments |of any X|
|00001480| 43 4d 44 20 74 6f 20 50 | 61 73 63 61 6c 20 73 74 |CMD to P|ascal st|
|00001490| 72 69 6e 67 73 2e 7d 0d | 0d 0d 0d 46 55 4e 43 54 |rings.}.|...FUNCT|
|000014a0| 49 4f 4e 20 53 74 72 54 | 6f 4c 6f 6e 67 28 73 74 |ION StrT|oLong(st|
|000014b0| 72 3a 20 53 74 72 33 31 | 29 3a 20 4c 6f 6e 67 49 |r: Str31|): LongI|
|000014c0| 6e 74 3b 0d 0d 7b 43 6f | 6e 76 65 72 74 20 61 20 |nt;..{Co|nvert a |
|000014d0| 73 74 72 69 6e 67 20 6f | 66 20 41 53 43 49 49 20 |string o|f ASCII |
|000014e0| 64 65 63 69 6d 61 6c 20 | 64 69 67 69 74 73 20 74 |decimal |digits t|
|000014f0| 6f 20 61 6e 20 75 6e 73 | 69 67 6e 65 64 20 6c 6f |o an uns|igned lo|
|00001500| 6e 67 20 69 6e 74 65 67 | 65 72 2e 7d 0d 0d 0d 0d |ng integ|er.}....|
|00001510| 46 55 4e 43 54 49 4f 4e | 20 53 74 72 54 6f 4e 75 |FUNCTION| StrToNu|
|00001520| 6d 28 73 74 72 3a 20 53 | 74 72 33 31 29 3a 20 4c |m(str: S|tr31): L|
|00001530| 6f 6e 67 49 6e 74 3b 0d | 0d 7b 43 6f 6e 76 65 72 |ongInt;.|.{Conver|
|00001540| 74 20 61 20 73 74 72 69 | 6e 67 20 6f 66 20 41 53 |t a stri|ng of AS|
|00001550| 43 49 49 20 64 65 63 69 | 6d 61 6c 20 64 69 67 69 |CII deci|mal digi|
|00001560| 74 73 20 74 6f 20 61 20 | 73 69 67 6e 65 64 20 6c |ts to a |signed l|
|00001570| 6f 6e 67 20 69 6e 74 65 | 67 65 72 2e 0d 0d 4e 65 |ong inte|ger...Ne|
|00001580| 67 61 74 69 76 65 20 73 | 69 67 6e 20 69 73 20 61 |gative s|ign is a|
|00001590| 6c 6c 6f 77 65 64 2e 7d | 0d 0d 0d 0d 46 55 4e 43 |llowed.}|....FUNC|
|000015a0| 54 49 4f 4e 20 53 74 72 | 54 6f 42 6f 6f 6c 28 73 |TION Str|ToBool(s|
|000015b0| 74 72 3a 20 53 74 72 33 | 31 29 3a 20 42 4f 4f 4c |tr: Str3|1): BOOL|
|000015c0| 45 41 4e 3b 0d 0d 7b 43 | 6f 6e 76 65 72 74 20 74 |EAN;..{C|onvert t|
|000015d0| 68 65 20 50 61 73 63 61 | 6c 20 73 74 72 69 6e 67 |he Pasca|l string|
|000015e0| 73 20 27 74 72 75 65 27 | 20 61 6e 64 20 27 66 61 |s 'true'| and 'fa|
|000015f0| 6c 73 65 27 20 74 6f 20 | 62 6f 6f 6c 65 61 6e 73 |lse' to |booleans|
|00001600| 2e 7d 0d 0d 0d 0d 46 55 | 4e 43 54 49 4f 4e 20 53 |.}....FU|NCTION S|
|00001610| 74 72 54 6f 45 78 74 28 | 73 74 72 3a 20 53 74 72 |trToExt(|str: Str|
|00001620| 33 31 29 3a 20 45 78 74 | 65 6e 64 65 64 3b 0d 0d |31): Ext|ended;..|
|00001630| 7b 43 6f 6e 76 65 72 74 | 20 61 20 73 74 72 69 6e |{Convert| a strin|
|00001640| 67 20 6f 66 20 41 53 43 | 49 49 20 64 65 63 69 6d |g of ASC|II decim|
|00001650| 61 6c 20 64 69 67 69 74 | 73 20 74 6f 20 61 6e 20 |al digit|s to an |
|00001660| 65 78 74 65 6e 64 65 64 | 20 6c 6f 6e 67 20 69 6e |extended| long in|
|00001670| 74 65 67 65 72 2e 7d 20 | 56 41 52 0d 78 3a 20 45 |teger.} |VAR.x: E|
|00001680| 78 74 65 6e 64 65 64 3b | 0d 0d 0d 0d 46 55 4e 43 |xtended;|....FUNC|
|00001690| 54 49 4f 4e 20 4c 6f 6e | 67 54 6f 53 74 72 28 70 |TION Lon|gToStr(p|
|000016a0| 6f 73 4e 75 6d 3a 20 4c | 6f 6e 67 49 6e 74 29 3a |osNum: L|ongInt):|
|000016b0| 20 53 74 72 33 31 3b 0d | 0d 7b 43 6f 6e 76 65 72 | Str31;.|.{Conver|
|000016c0| 74 20 61 6e 20 75 6e 73 | 69 67 6e 65 64 20 6c 6f |t an uns|igned lo|
|000016d0| 6e 67 20 69 6e 74 65 67 | 65 72 20 74 6f 20 61 20 |ng integ|er to a |
|000016e0| 50 61 73 63 61 6c 20 73 | 74 72 69 6e 67 2e 7d 0d |Pascal s|tring.}.|
|000016f0| 0d 0d 0d 46 55 4e 43 54 | 49 4f 4e 20 4e 75 6d 54 |...FUNCT|ION NumT|
|00001700| 6f 53 74 72 28 6e 75 6d | 3a 20 4c 6f 6e 67 49 6e |oStr(num|: LongIn|
|00001710| 74 29 3a 20 53 74 72 33 | 31 3b 0d 0d 7b 43 6f 6e |t): Str3|1;..{Con|
|00001720| 76 65 72 74 20 61 20 73 | 69 67 6e 65 64 20 6c 6f |vert a s|igned lo|
|00001730| 6e 67 20 69 6e 74 65 67 | 65 72 20 74 6f 20 61 20 |ng integ|er to a |
|00001740| 50 61 73 63 61 6c 20 73 | 74 72 69 6e 67 2e 7d 0d |Pascal s|tring.}.|
|00001750| 0d 0d 0d 46 55 4e 43 54 | 49 4f 4e 20 4e 75 6d 54 |...FUNCT|ION NumT|
|00001760| 6f 48 65 78 28 6e 75 6d | 3a 20 4c 6f 6e 67 49 6e |oHex(num|: LongIn|
|00001770| 74 3b 20 6e 44 69 67 69 | 74 73 3a 20 49 4e 54 45 |t; nDigi|ts: INTE|
|00001780| 47 45 52 29 3a 20 53 74 | 72 33 31 3b 0d 0d 7b 43 |GER): St|r31;..{C|
|00001790| 6f 6e 76 65 72 74 20 61 | 6e 20 75 6e 73 69 67 6e |onvert a|n unsign|
|000017a0| 65 64 20 6c 6f 6e 67 20 | 69 6e 74 65 67 65 72 20 |ed long |integer |
|000017b0| 74 6f 20 61 20 68 65 78 | 61 64 65 63 69 6d 61 6c |to a hex|adecimal|
|000017c0| 20 6e 75 6d 62 65 72 20 | 61 6e 64 20 70 75 74 20 | number |and put |
|000017d0| 69 74 0d 0d 69 6e 74 6f | 20 61 20 50 61 73 63 61 |it..into| a Pasca|
|000017e0| 6c 20 73 74 72 69 6e 67 | 2e 7d 0d 0d 0d 0d 46 55 |l string|.}....FU|
|000017f0| 4e 43 54 49 4f 4e 20 42 | 6f 6f 6c 54 6f 53 74 72 |NCTION B|oolToStr|
|00001800| 28 62 6f 6f 6c 3a 20 42 | 4f 4f 4c 45 41 4e 29 3a |(bool: B|OOLEAN):|
|00001810| 20 53 74 72 33 31 3b 0d | 0d 7b 43 6f 6e 76 65 72 | Str31;.|.{Conver|
|00001820| 74 20 61 20 42 4f 4f 4c | 45 41 4e 20 74 6f 20 27 |t a BOOL|EAN to '|
|00001830| 74 72 75 65 27 20 6f 72 | 20 27 66 61 6c 73 65 27 |true' or| 'false'|
|00001840| 2e 7d 0d 0d 56 41 52 20 | 73 74 72 3a 20 53 74 72 |.}..VAR |str: Str|
|00001850| 33 31 3b 0d 0d 0d 0d 46 | 55 4e 43 54 49 4f 4e 20 |31;....F|UNCTION |
|00001860| 45 78 74 54 6f 53 74 72 | 28 6e 75 6d 3a 20 45 78 |ExtToStr|(num: Ex|
|00001870| 74 65 6e 64 65 64 29 3a | 20 53 74 72 33 31 3b 0d |tended):| Str31;.|
|00001880| 0d 7b 43 6f 6e 76 65 72 | 74 20 61 6e 20 65 78 74 |.{Conver|t an ext|
|00001890| 65 6e 64 65 64 20 6c 6f | 6e 67 20 69 6e 74 65 67 |ended lo|ng integ|
|000018a0| 65 72 20 74 6f 20 64 65 | 63 69 6d 61 6c 20 64 69 |er to de|cimal di|
|000018b0| 67 69 74 73 20 69 6e 20 | 61 20 73 74 72 69 6e 67 |gits in |a string|
|000018c0| 2e 7d 0d 0d 0d 0d 46 55 | 4e 43 54 49 4f 4e 20 47 |.}....FU|NCTION G|
|000018d0| 65 74 47 6c 6f 62 61 6c | 28 67 6c 6f 62 4e 61 6d |etGlobal|(globNam|
|000018e0| 65 3a 20 53 74 72 32 35 | 35 29 3a 20 48 61 6e 64 |e: Str25|5): Hand|
|000018f0| 6c 65 3b 0d 0d 7b 52 65 | 74 75 72 6e 20 61 20 68 |le;..{Re|turn a h|
|00001900| 61 6e 64 6c 65 20 74 6f | 20 61 20 7a 65 72 6f 2d |andle to| a zero-|
|00001910| 74 65 72 6d 69 6e 61 74 | 65 64 20 73 74 72 69 6e |terminat|ed strin|
|00001920| 67 20 63 6f 6e 74 61 69 | 6e 69 6e 67 20 74 68 65 |g contai|ning the|
|00001930| 20 76 61 6c 75 65 20 6f | 66 20 74 68 65 0d 73 70 | value o|f the.sp|
|00001940| 65 63 69 66 69 65 64 20 | 48 79 70 65 72 54 61 6c |ecified |HyperTal|
|00001950| 6b 20 67 6c 6f 62 61 6c | 20 76 61 72 69 61 62 6c |k global| variabl|
|00001960| 65 2e 7d 0d 0d 0d 0d 50 | 52 4f 43 45 44 55 52 45 |e.}....P|ROCEDURE|
|00001970| 20 53 65 74 47 6c 6f 62 | 61 6c 28 67 6c 6f 62 4e | SetGlob|al(globN|
|00001980| 61 6d 65 3a 20 53 74 72 | 32 35 35 3b 20 67 6c 6f |ame: Str|255; glo|
|00001990| 62 56 61 6c 75 65 3a 20 | 48 61 6e 64 6c 65 29 3b |bValue: |Handle);|
|000019a0| 0d 0d 7b 53 65 74 20 74 | 68 65 20 76 61 6c 75 65 |..{Set t|he value|
|000019b0| 20 6f 66 20 74 68 65 20 | 73 70 65 63 69 66 69 65 | of the |specifie|
|000019c0| 64 20 48 79 70 65 72 54 | 61 6c 6b 20 67 6c 6f 62 |d HyperT|alk glob|
|000019d0| 61 6c 20 76 61 72 69 61 | 62 6c 65 20 74 6f 20 62 |al varia|ble to b|
|000019e0| 65 20 74 68 65 0d 7a 65 | 72 6f 2d 74 65 72 6d 69 |e the.ze|ro-termi|
|000019f0| 6e 61 74 65 64 20 73 74 | 72 69 6e 67 20 69 6e 20 |nated st|ring in |
|00001a00| 67 6c 6f 62 56 61 6c 75 | 65 2e 20 54 68 65 20 63 |globValu|e. The c|
|00001a10| 6f 6e 74 65 6e 74 73 20 | 6f 66 20 74 68 65 20 48 |ontents |of the H|
|00001a20| 61 6e 64 6c 65 20 61 72 | 65 20 63 6f 70 69 65 64 |andle ar|e copied|
|00001a30| 2c 0d 73 6f 20 79 6f 75 | 20 6d 75 73 74 20 73 74 |,.so you| must st|
|00001a40| 69 6c 6c 20 64 69 73 70 | 6f 73 65 20 69 74 20 61 |ill disp|ose it a|
|00001a50| 66 74 65 72 77 61 72 64 | 73 2e 7d 0d 0d 0d 0d 46 |fterward|s.}....F|
|00001a60| 55 4e 43 54 49 4f 4e 20 | 47 65 74 46 69 65 6c 64 |UNCTION |GetField|
|00001a70| 42 79 4e 61 6d 65 28 63 | 61 72 64 46 69 65 6c 64 |ByName(c|ardField|
|00001a80| 46 6c 61 67 3a 20 42 4f | 4f 4c 45 41 4e 3b 20 66 |Flag: BO|OLEAN; f|
|00001a90| 69 65 6c 64 4e 61 6d 65 | 3a 20 53 74 72 32 35 35 |ieldName|: Str255|
|00001aa0| 29 3a 0d 48 61 6e 64 6c | 65 3b 0d 0d 7b 52 65 74 |):.Handl|e;..{Ret|
|00001ab0| 75 72 6e 20 61 20 68 61 | 6e 64 6c 65 20 74 6f 20 |urn a ha|ndle to |
|00001ac0| 61 20 7a 65 72 6f 2d 74 | 65 72 6d 69 6e 61 74 65 |a zero-t|erminate|
|00001ad0| 64 20 73 74 72 69 6e 67 | 20 63 6f 6e 74 61 69 6e |d string| contain|
|00001ae0| 69 6e 67 20 74 68 65 20 | 76 61 6c 75 65 20 6f 66 |ing the |value of|
|00001af0| 20 66 69 65 6c 64 0d 66 | 69 65 6c 64 4e 61 6d 65 | field.f|ieldName|
|00001b00| 20 6f 6e 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | on the |current |
|00001b10| 63 61 72 64 2e 20 59 6f | 75 20 6d 75 73 74 20 64 |card. Yo|u must d|
|00001b20| 69 73 70 6f 73 65 20 74 | 68 65 20 68 61 6e 64 6c |ispose t|he handl|
|00001b30| 65 2e 63 61 72 64 46 69 | 65 6c 64 46 6c 61 67 0d |e.cardFi|eldFlag.|
|00001b40| 73 65 74 20 74 6f 20 66 | 61 6c 73 65 20 69 6e 64 |set to f|alse ind|
|00001b50| 69 63 61 74 65 73 20 62 | 61 63 6b 67 72 6f 75 6e |icates b|ackgroun|
|00001b60| 64 2c 20 69 6e 73 74 65 | 61 64 20 6f 66 20 63 61 |d, inste|ad of ca|
|00001b70| 72 64 2c 20 66 69 65 6c | 64 2e 7d 0d 0d 0d 0d 46 |rd, fiel|d.}....F|
|00001b80| 55 4e 43 54 49 4f 4e 20 | 47 65 74 46 69 65 6c 64 |UNCTION |GetField|
|00001b90| 42 79 4e 75 6d 28 63 61 | 72 64 46 69 65 6c 64 46 |ByNum(ca|rdFieldF|
|00001ba0| 6c 61 67 3a 20 42 4f 4f | 4c 45 41 4e 3b 20 66 69 |lag: BOO|LEAN; fi|
|00001bb0| 65 6c 64 4e 75 6d 3a 20 | 49 4e 54 45 47 45 52 29 |eldNum: |INTEGER)|
|00001bc0| 3a 0d 48 61 6e 64 6c 65 | 3b 0d 0d 7b 52 65 74 75 |:.Handle|;..{Retu|
|00001bd0| 72 6e 20 61 20 68 61 6e | 64 6c 65 20 74 6f 20 61 |rn a han|dle to a|
|00001be0| 20 7a 65 72 6f 2d 74 65 | 72 6d 69 6e 61 74 65 64 | zero-te|rminated|
|00001bf0| 20 73 74 72 69 6e 67 20 | 63 6f 6e 74 61 69 6e 69 | string |containi|
|00001c00| 6e 67 20 74 68 65 20 76 | 61 6c 75 65 20 6f 66 20 |ng the v|alue of |
|00001c10| 66 69 65 6c 64 0d 66 69 | 65 6c 64 4e 75 6d 20 6f |field.fi|eldNum o|
|00001c20| 6e 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 63 61 |n the cu|rrent ca|
|00001c30| 72 64 2e 20 59 6f 75 20 | 6d 75 73 74 20 64 69 73 |rd. You |must dis|
|00001c40| 70 6f 73 65 20 74 68 65 | 20 68 61 6e 64 6c 65 2e |pose the| handle.|
|00001c50| 7d 0d 0d 0d 0d 46 55 4e | 43 54 49 4f 4e 20 47 65 |}....FUN|CTION Ge|
|00001c60| 74 46 69 65 6c 64 42 79 | 49 44 28 63 61 72 64 46 |tFieldBy|ID(cardF|
|00001c70| 69 65 6c 64 46 6c 61 67 | 3a 20 42 4f 4f 4c 45 41 |ieldFlag|: BOOLEA|
|00001c80| 4e 3b 20 66 69 65 6c 64 | 49 44 3a 20 49 4e 54 45 |N; field|ID: INTE|
|00001c90| 47 45 52 29 3a 20 48 61 | 6e 64 6c 65 3b 0d 0d 7b |GER): Ha|ndle;..{|
|00001ca0| 52 65 74 75 72 6e 20 61 | 20 68 61 6e 64 6c 65 20 |Return a| handle |
|00001cb0| 74 6f 20 61 20 7a 65 72 | 6f 2d 74 65 72 6d 69 6e |to a zer|o-termin|
|00001cc0| 61 74 65 64 20 73 74 72 | 69 6e 67 20 63 6f 6e 74 |ated str|ing cont|
|00001cd0| 61 69 6e 69 6e 67 20 74 | 68 65 20 76 61 6c 75 65 |aining t|he value|
|00001ce0| 20 6f 66 20 74 68 65 0d | 66 69 65 6c 64 20 77 68 | of the.|field wh|
|00001cf0| 69 6c 65 20 49 44 20 69 | 73 20 66 69 65 6c 64 49 |ile ID i|s fieldI|
|00001d00| 44 2e 20 59 6f 75 20 6d | 75 73 74 20 64 69 73 70 |D. You m|ust disp|
|00001d10| 6f 73 65 20 74 68 65 20 | 68 61 6e 64 6c 65 2e 7d |ose the |handle.}|
|00001d20| 0d 0d 0d 0d 50 52 4f 43 | 45 44 55 52 45 20 53 65 |....PROC|EDURE Se|
|00001d30| 74 46 69 65 6c 64 42 79 | 4e 61 6d 65 28 63 61 72 |tFieldBy|Name(car|
|00001d40| 64 46 69 65 6c 64 46 6c | 61 67 3a 20 42 4f 4f 4c |dFieldFl|ag: BOOL|
|00001d50| 45 41 4e 3b 20 66 69 65 | 6c 64 4e 61 6d 65 3a 20 |EAN; fie|ldName: |
|00001d60| 53 74 72 32 35 35 3b 0d | 66 69 65 6c 64 56 61 6c |Str255;.|fieldVal|
|00001d70| 3a 20 48 61 6e 64 6c 65 | 29 3b 0d 0d 7b 53 65 74 |: Handle|);..{Set|
|00001d80| 20 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 66 69 | the val|ue of fi|
|00001d90| 65 6c 64 20 66 69 65 6c | 64 4e 61 6d 65 20 74 6f |eld fiel|dName to|
|00001da0| 20 62 65 20 74 68 65 20 | 7a 65 72 6f 2d 74 65 72 | be the |zero-ter|
|00001db0| 6d 69 6e 61 74 65 64 20 | 73 74 72 69 6e 67 20 69 |minated |string i|
|00001dc0| 6e 0d 66 69 65 6c 64 56 | 61 6c 2e 20 54 68 65 20 |n.fieldV|al. The |
|00001dd0| 63 6f 6e 74 65 6e 74 73 | 20 6f 66 20 74 68 65 20 |contents| of the |
|00001de0| 48 61 6e 64 6c 65 20 61 | 72 65 20 63 6f 70 69 65 |Handle a|re copie|
|00001df0| 64 2c 20 73 6f 20 79 6f | 75 20 6d 75 73 74 20 73 |d, so yo|u must s|
|00001e00| 74 69 6c 6c 20 64 69 73 | 70 6f 73 65 20 69 74 0d |till dis|pose it.|
|00001e10| 61 66 74 65 72 77 61 72 | 64 73 2e 7d 0d 0d 0d 0d |afterwar|ds.}....|
|00001e20| 50 52 4f 43 45 44 55 52 | 45 20 53 65 74 46 69 65 |PROCEDUR|E SetFie|
|00001e30| 6c 64 42 79 4e 75 6d 28 | 63 61 72 64 46 69 65 6c |ldByNum(|cardFiel|
|00001e40| 64 46 6c 61 67 3a 20 42 | 4f 4f 4c 45 41 4e 3b 20 |dFlag: B|OOLEAN; |
|00001e50| 66 69 65 6c 64 4e 75 6d | 3a 20 49 4e 54 45 47 45 |fieldNum|: INTEGE|
|00001e60| 52 3b 0d 66 69 65 6c 64 | 56 61 6c 3a 20 48 61 6e |R;.field|Val: Han|
|00001e70| 64 6c 65 29 3b 0d 0d 7b | 53 65 74 20 74 68 65 20 |dle);..{|Set the |
|00001e80| 76 61 6c 75 65 20 6f 66 | 20 66 69 65 6c 64 20 66 |value of| field f|
|00001e90| 69 65 6c 64 4e 75 6d 20 | 74 6f 20 62 65 20 74 68 |ieldNum |to be th|
|00001ea0| 65 20 7a 65 72 6f 2d 74 | 65 72 6d 69 6e 61 74 65 |e zero-t|erminate|
|00001eb0| 64 20 73 74 72 69 6e 67 | 20 69 6e 0d 66 69 65 6c |d string| in.fiel|
|00001ec0| 64 56 61 6c 2e 20 54 68 | 65 20 63 6f 6e 74 65 6e |dVal. Th|e conten|
|00001ed0| 74 73 20 6f 66 20 74 68 | 65 20 48 61 6e 64 6c 65 |ts of th|e Handle|
|00001ee0| 20 61 72 65 20 63 6f 70 | 69 65 64 2c 20 73 6f 20 | are cop|ied, so |
|00001ef0| 79 6f 75 20 6d 75 73 74 | 20 73 74 69 6c 6c 20 64 |you must| still d|
|00001f00| 69 73 70 6f 73 65 20 69 | 74 0d 61 66 74 65 72 77 |ispose i|t.afterw|
|00001f10| 61 72 64 73 2e 7d 0d 0d | 0d 0d 50 52 4f 43 45 44 |ards.}..|..PROCED|
|00001f20| 55 52 45 20 53 65 74 46 | 69 65 6c 64 42 79 49 44 |URE SetF|ieldByID|
|00001f30| 28 63 61 72 64 46 69 65 | 6c 64 46 6c 61 67 3a 42 |(cardFie|ldFlag:B|
|00001f40| 4f 4f 4c 45 41 4e 3b 20 | 66 69 65 6c 64 49 44 3a |OOLEAN; |fieldID:|
|00001f50| 20 49 4e 54 45 47 45 52 | 3b 20 66 69 65 6c 64 56 | INTEGER|; fieldV|
|00001f60| 61 6c 3a 0d 48 61 6e 64 | 6c 65 29 3b 0d 0d 7b 53 |al:.Hand|le);..{S|
|00001f70| 65 74 20 74 68 65 20 76 | 61 6c 75 65 20 6f 66 20 |et the v|alue of |
|00001f80| 74 68 65 20 66 69 65 6c | 64 20 77 68 6f 73 65 20 |the fiel|d whose |
|00001f90| 49 44 20 69 73 20 66 69 | 65 6c 64 49 44 20 74 6f |ID is fi|eldID to|
|00001fa0| 20 62 65 20 74 68 65 20 | 7a 65 72 6f 2d 74 65 72 | be the |zero-ter|
|00001fb0| 6d 69 6e 61 74 65 64 0d | 73 74 72 69 6e 67 20 69 |minated.|string i|
|00001fc0| 6e 20 66 69 65 6c 64 56 | 61 6c 2e 20 54 68 65 20 |n fieldV|al. The |
|00001fd0| 63 6f 6e 74 65 6e 74 73 | 20 6f 66 20 74 68 65 20 |contents| of the |
|00001fe0| 48 61 6e 64 6c 65 20 61 | 72 65 20 63 6f 70 69 65 |Handle a|re copie|
|00001ff0| 64 2c 20 73 6f 20 79 6f | 75 20 6d 75 73 74 20 73 |d, so yo|u must s|
|00002000| 74 69 6c 6c 0d 64 69 73 | 70 6f 73 65 20 69 74 20 |till.dis|pose it |
|00002010| 61 66 74 65 72 77 61 72 | 64 73 2e 7d 0d 0d 0d 0d |afterwar|ds.}....|
|00002020| 46 55 4e 43 54 49 4f 4e | 20 53 74 72 69 6e 67 45 |FUNCTION| StringE|
|00002030| 71 75 61 6c 28 73 74 72 | 31 2c 73 74 72 32 3a 20 |qual(str|1,str2: |
|00002040| 53 74 72 32 35 35 29 3a | 20 42 4f 4f 4c 45 41 4e |Str255):| BOOLEAN|
|00002050| 3b 0d 0d 7b 52 65 74 75 | 72 6e 20 74 72 75 65 20 |;..{Retu|rn true |
|00002060| 69 66 20 74 68 65 20 74 | 77 6f 20 73 74 72 69 6e |if the t|wo strin|
|00002070| 67 73 20 68 61 76 65 20 | 74 68 65 20 73 61 6d 65 |gs have |the same|
|00002080| 20 63 68 61 72 61 63 74 | 65 72 73 2e 20 43 61 73 | charact|ers. Cas|
|00002090| 65 20 69 6e 73 65 6e 73 | 69 74 69 76 65 0d 63 6f |e insens|itive.co|
|000020a0| 6d 70 61 72 65 20 6f 66 | 20 74 68 65 20 73 74 72 |mpare of| the str|
|000020b0| 69 6e 67 73 2e 7d 0d 0d | 0d 0d 50 52 4f 43 45 44 |ings.}..|..PROCED|
|000020c0| 55 52 45 20 52 65 74 75 | 72 6e 54 6f 50 61 73 28 |URE Retu|rnToPas(|
|000020d0| 7a 65 72 6f 53 74 72 3a | 20 50 74 72 3b 20 56 41 |zeroStr:| Ptr; VA|
|000020e0| 52 20 70 61 73 53 74 72 | 3a 20 53 74 72 32 35 35 |R pasStr|: Str255|
|000020f0| 29 3b 0d 0d 7b 7a 65 72 | 6f 53 74 72 20 70 6f 69 |);..{zer|oStr poi|
|00002100| 6e 74 73 20 69 6e 74 6f | 20 61 20 7a 65 72 6f 2d |nts into| a zero-|
|00002110| 74 65 72 6d 69 6e 61 74 | 65 64 20 73 74 72 69 6e |terminat|ed strin|
|00002120| 67 2e 20 43 6f 6c 6c 65 | 63 74 20 74 68 65 20 63 |g. Colle|ct the c|
|00002130| 68 61 72 61 63 74 65 72 | 73 20 66 72 6f 6d 0d 74 |haracter|s from.t|
|00002140| 68 65 72 65 20 74 6f 20 | 74 68 65 20 6e 65 78 74 |here to |the next|
|00002150| 20 63 61 72 72 69 61 67 | 65 20 52 65 74 75 72 6e | carriag|e Return|
|00002160| 20 61 6e 64 20 72 65 74 | 75 72 6e 20 74 68 65 6d | and ret|urn them|
|00002170| 20 69 6e 20 74 68 65 20 | 50 61 73 63 61 6c 20 73 | in the |Pascal s|
|00002180| 74 72 69 6e 67 0d 70 61 | 73 53 74 72 2e 20 49 66 |tring.pa|sStr. If|
|00002190| 20 61 20 52 65 74 75 72 | 6e 20 69 73 20 6e 6f 74 | a Retur|n is not|
|000021a0| 20 66 6f 75 6e 64 2c 20 | 63 6f 6c 6c 65 63 74 20 | found, |collect |
|000021b0| 63 68 61 72 73 20 75 6e | 74 69 6c 20 74 68 65 20 |chars un|til the |
|000021c0| 65 6e 64 20 6f 66 20 74 | 68 65 20 73 74 72 69 6e |end of t|he strin|
|000021d0| 67 2e 7d 0d 0d 0d 0d 50 | 52 4f 43 45 44 55 52 45 |g.}....P|ROCEDURE|
|000021e0| 20 53 63 61 6e 54 6f 52 | 65 74 75 72 6e 28 56 41 | ScanToR|eturn(VA|
|000021f0| 52 20 73 63 61 6e 50 74 | 72 3a 20 50 74 72 29 3b |R scanPt|r: Ptr);|
|00002200| 0d 0d 7b 4d 6f 76 65 20 | 74 68 65 20 70 6f 69 6e |..{Move |the poin|
|00002210| 74 65 72 20 73 63 61 6e | 50 74 72 20 61 6c 6f 6e |ter scan|Ptr alon|
|00002220| 67 20 61 20 7a 65 72 6f | 2d 74 65 72 6d 69 6e 61 |g a zero|-termina|
|00002230| 74 65 64 20 73 74 72 69 | 6e 67 20 75 6e 74 69 6c |ted stri|ng until|
|00002240| 20 69 74 20 70 6f 69 6e | 74 73 20 61 74 0d 61 20 | it poin|ts at.a |
|00002250| 52 65 74 75 72 6e 20 63 | 68 61 72 61 63 74 65 72 |Return c|haracter|
|00002260| 20 6f 72 20 61 20 7a 65 | 72 6f 20 62 79 74 65 2e | or a ze|ro byte.|
|00002270| 7d 0d 0d 0d 0d 50 52 4f | 43 45 44 55 52 45 20 53 |}....PRO|CEDURE S|
|00002280| 63 61 6e 54 6f 5a 65 72 | 6f 28 56 41 52 20 73 63 |canToZer|o(VAR sc|
|00002290| 61 6e 50 74 72 3a 20 50 | 74 72 29 3b 0d 0d 7b 4d |anPtr: P|tr);..{M|
|000022a0| 6f 76 65 20 74 68 65 20 | 70 6f 69 6e 74 65 72 20 |ove the |pointer |
|000022b0| 73 63 61 6e 50 74 72 20 | 61 6c 6f 6e 67 20 61 20 |scanPtr |along a |
|000022c0| 7a 65 72 6f 2d 74 65 72 | 6d 69 6e 61 74 65 64 20 |zero-ter|minated |
|000022d0| 73 74 72 69 6e 67 20 75 | 6e 74 69 6c 20 69 74 20 |string u|ntil it |
|000022e0| 70 6f 69 6e 74 73 20 61 | 74 0d 61 20 7a 65 72 6f |points a|t.a zero|
|000022f0| 20 62 79 74 65 2e 7d 0d | 0d 0d 0d 48 65 72 65 20 | byte.}.|...Here |
|00002300| 61 72 65 20 74 68 65 20 | 66 69 6c 65 73 20 79 6f |are the |files yo|
|00002310| 75 20 77 69 6c 6c 20 6e | 65 65 64 3a 0d 0d 0d 0d |u will n|eed:....|
|00002320| 48 79 70 65 72 58 43 6d | 64 2e 70 20 58 43 6d 64 |HyperXCm|d.p XCmd|
|00002330| 47 6c 75 65 2e 69 6e 63 | 0d 0d 46 6c 61 73 68 2e |Glue.inc|..Flash.|
|00002340| 70 20 28 41 6e 20 65 78 | 61 6d 70 6c 65 20 63 6f |p (An ex|ample co|
|00002350| 6d 6d 61 6e 64 20 74 6f | 20 73 65 65 20 68 6f 77 |mmand to| see how|
|00002360| 20 65 76 65 72 79 74 68 | 69 6e 67 20 69 73 20 72 | everyth|ing is r|
|00002370| 65 61 6c 6c 79 20 64 6f | 6e 65 2e 29 0d 0d 50 65 |eally do|ne.)..Pe|
|00002380| 65 6b 2e 70 20 20 28 41 | 6e 20 65 78 61 6d 70 6c |ek.p (A|n exampl|
|00002390| 65 20 66 75 6e 63 74 69 | 6f 6e 20 74 6f 20 73 65 |e functi|on to se|
|000023a0| 65 20 68 6f 77 20 65 76 | 65 72 79 74 68 69 6e 67 |e how ev|erything|
|000023b0| 20 69 73 20 72 65 61 6c | 6c 79 20 64 6f 6e 65 2e | is real|ly done.|
|000023c0| 29 0d 0d 0d 0d 48 65 72 | 65 20 61 72 65 20 74 68 |)....Her|e are th|
|000023d0| 65 20 74 79 70 69 63 61 | 6c 20 4d 50 57 20 63 6f |e typica|l MPW co|
|000023e0| 6d 6d 61 6e 64 73 20 66 | 6f 72 20 63 6f 6d 70 69 |mmands f|or compi|
|000023f0| 6c 69 6e 67 20 61 6e 20 | 58 43 4d 44 20 3a 0d 0d |ling an |XCMD :..|
|00002400| 0d 0d 20 20 20 70 61 73 | 63 61 6c 20 2d 77 20 20 |.. pas|cal -w |
|00002410| 20 20 50 69 6f 6e 65 65 | 72 4c 56 50 34 32 30 30 | Pionee|rLVP4200|
|00002420| 2e 70 20 20 20 20 6c 69 | 6e 6b 20 2d 6d 20 45 4e |.p li|nk -m EN|
|00002430| 54 52 59 50 4f 49 4e 54 | 20 2d 6f 20 56 69 64 65 |TRYPOINT| -o Vide|
|00002440| 6f 20 2d 72 74 0d 0d 20 | 20 20 58 43 4d 44 3d 31 |o -rt.. | XCMD=1|
|00002450| 35 20 2d 73 6e 20 20 20 | 20 4d 61 69 6e 3d 50 69 |5 -sn | Main=Pi|
|00002460| 6f 6e 65 65 72 4c 56 50 | 34 32 30 30 0d 0d b6 0d |oneerLVP|4200....|
|00002470| 0d 20 20 20 50 69 6f 6e | 65 65 72 4c 56 50 34 32 |. Pion|eerLVP42|
|00002480| 30 30 2e 70 2e 6f 20 22 | 7b 4d 50 57 7d 22 20 4c |00.p.o "|{MPW}" L|
|00002490| 69 62 72 61 72 69 65 73 | 3a 69 6e 74 65 72 66 61 |ibraries|:interfa|
|000024a0| 63 65 2e 6f 0d 0d 0d 0d | 22 56 69 64 65 6f 22 20 |ce.o....|"Video" |
|000024b0| 69 73 20 74 68 65 20 73 | 74 61 63 6b 20 74 68 61 |is the s|tack tha|
|000024c0| 74 20 4d 50 57 20 77 69 | 6c 6c 20 69 6e 73 74 61 |t MPW wi|ll insta|
|000024d0| 6c 6c 20 74 68 65 20 58 | 43 4d 44 20 69 6e 2e 20 |ll the X|CMD in. |
|000024e0| 49 66 20 79 6f 75 20 64 | 6f 6e 27 74 20 75 73 65 |If you d|on't use|
|000024f0| 20 61 6e 79 0d 6f 66 20 | 74 68 65 20 72 6f 75 74 | any.of |the rout|
|00002500| 69 6e 65 73 20 69 6e 20 | 69 6e 74 65 72 66 61 63 |ines in |interfac|
|00002510| 65 2e 6f 2c 20 69 74 73 | 20 6a 75 73 74 3a 0d 0d |e.o, its| just:..|
|00002520| 0d 0d 20 20 20 70 61 73 | 63 61 6c 20 46 6c 61 73 |.. pas|cal Flas|
|00002530| 68 2e 70 0d 0d 20 20 20 | 6c 69 6e 6b 20 2d 6f 20 |h.p.. |link -o |
|00002540| 48 79 70 65 72 43 6f 6d | 6d 61 6e 64 73 20 2d 72 |HyperCom|mands -r|
|00002550| 74 20 58 43 4d 44 3d 30 | 20 2d 73 6e 20 4d 61 69 |t XCMD=0| -sn Mai|
|00002560| 6e 3d 46 6c 61 73 68 20 | 46 6c 61 73 68 2e 70 2e |n=Flash |Flash.p.|
|00002570| 6f 0d 0d 0d 0d 41 66 74 | 65 72 20 65 78 65 63 75 |o....Aft|er execu|
|00002580| 74 69 6e 67 20 74 68 65 | 73 65 2c 20 75 73 65 20 |ting the|se, use |
|00002590| 52 65 73 45 64 69 74 20 | 74 6f 20 6d 6f 76 65 20 |ResEdit |to move |
|000025a0| 74 68 65 20 58 43 4d 44 | 20 6f 72 20 58 46 43 4e |the XCMD| or XFCN|
|000025b0| 20 74 6f 20 74 68 65 20 | 70 72 6f 70 65 72 0d 73 | to the |proper.s|
|000025c0| 74 61 63 6b 2e 0d 0d 0d | 0d 46 6f 72 20 22 43 22 |tack....|.For "C"|
|000025d0| 20 70 72 6f 67 72 61 6d | 6d 65 72 73 2c 20 74 68 | program|mers, th|
|000025e0| 65 20 61 75 74 68 6f 72 | 20 68 61 73 20 70 72 6f |e author| has pro|
|000025f0| 76 69 64 65 64 20 61 20 | 64 65 66 69 6e 69 74 69 |vided a |definiti|
|00002600| 6f 6e 20 28 48 79 70 65 | 72 58 43 6d 64 2e 68 29 |on (Hype|rXCmd.h)|
|00002610| 0d 61 6e 64 20 61 6e 20 | 69 6e 63 6c 75 64 65 20 |.and an |include |
|00002620| 66 69 6c 65 20 28 58 43 | 6d 64 47 6c 75 65 2e 69 |file (XC|mdGlue.i|
|00002630| 6e 63 2e 63 29 20 61 6e | 64 20 61 6e 20 65 78 61 |nc.c) an|d an exa|
|00002640| 6d 70 6c 65 20 28 43 46 | 6c 61 73 68 2e 63 29 2e |mple (CF|lash.c).|
|00002650| 0d 0d 0d 0d 42 72 65 61 | 6b 70 6f 69 6e 74 73 20 |....Brea|kpoints |
|00002660| 64 6f 20 6e 6f 74 20 61 | 70 70 65 61 72 20 74 6f |do not a|ppear to|
|00002670| 20 77 6f 72 6b 20 69 6e | 20 58 43 4d 44 73 2c 20 | work in| XCMDs, |
|00002680| 62 75 74 20 70 75 74 74 | 69 6e 67 20 61 20 64 65 |but putt|ing a de|
|00002690| 62 75 67 67 65 72 20 63 | 61 6c 6c 20 69 6e 0d 79 |bugger c|all in.y|
|000026a0| 6f 75 72 20 63 6f 64 65 | 20 64 6f 65 73 20 77 6f |our code| does wo|
|000026b0| 72 6b 2e 20 49 6e 20 61 | 64 64 69 74 69 6f 6e 2c |rk. In a|ddition,|
|000026c0| 20 73 61 79 69 6e 67 3a | 0d 0d 0d 0d 20 20 20 68 | saying:|.... h|
|000026d0| 64 20 27 68 27 0d 0d 0d | 0d 69 6e 20 4d 61 63 73 |d 'h'...|.in Macs|
|000026e0| 42 75 67 20 61 6c 6c 6f | 77 73 20 79 6f 75 20 74 |Bug allo|ws you t|
|000026f0| 6f 20 66 69 6e 64 20 79 | 6f 75 72 20 72 65 73 6f |o find y|our reso|
|00002700| 75 72 63 65 20 69 6e 20 | 6d 65 6d 6f 72 79 20 62 |urce in |memory b|
|00002710| 79 20 73 65 65 69 6e 67 | 20 69 74 73 20 6e 61 6d |y seeing| its nam|
|00002720| 65 0d 61 6e 64 20 6c 6f | 63 61 74 69 6f 6e 20 69 |e.and lo|cation i|
|00002730| 6e 20 74 68 65 20 6c 69 | 73 74 69 6e 67 2e 0d 0d |n the li|sting...|
|00002740| 0d 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002780| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00002790| 6e 20 58 43 4d 44 73 2c | 20 62 75 74 20 70 75 74 |n XCMDs,| but put|
|000027a0| 74 69 6e 67 20 61 20 64 | 65 62 75 67 67 65 72 20 |ting a d|ebugger |
|000027b0| 11 48 6f 77 20 74 6f 20 | 6d 61 6b 65 20 58 43 4d |.How to |make XCM|
|000027c0| 44 73 02 00 00 00 50 61 | 72 74 53 49 54 78 00 00 |Ds....Pa|rtSITx..|
|000027d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000027e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027f0| 00 00 a9 8d 3a 88 00 00 | 00 00 00 00 01 7e 6c 6c |....:...|.....~ll|
|00002800| 6f 77 73 20 79 6f 75 20 | 74 6f 20 66 69 6e 64 20 |ows you |to find |
|00002810| 79 6f 75 72 20 72 65 73 | 6f 75 72 63 65 20 69 6e |your res|ource in|
|00002820| 20 6d 65 6d 6f 72 79 20 | 62 79 20 73 65 65 69 6e | memory |by seein|
|00002830| 67 20 69 74 73 20 6e 61 | 6d 65 0d 61 6e 64 20 6c |g its na|me.and l|
|00002840| 6f 63 61 74 69 6f 6e 20 | 69 6e 20 74 68 65 20 6c |ocation |in the l|
|00002850| 69 73 74 69 6e 67 2e 0d | 0d 0d 0d 00 00 00 00 00 |isting..|........|
|00002860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002880| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 14 |...H..Mo|naco....|
|00002890| 00 01 39 e0 00 0a 00 66 | 00 00 01 42 01 f1 80 0a |..9....f|...B....|
|000028a0| 00 00 00 14 00 01 00 06 | 00 04 00 29 00 02 01 85 |........|...)....|
|000028b0| 02 02 00 29 00 02 01 85 | 02 02 a1 11 ce d0 00 00 |...)....|........|
|000028c0| 12 62 00 00 12 6b 00 00 | 04 94 01 00 00 00 01 00 |.b...k..|........|
|000028d0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 35 0e 78 |...L...L|...2.5.x|
|000028e0| 05 84 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|000028f0| 00 0a 03 ed ff ff 00 00 | 00 00 00 36 46 94 00 00 |........|...6F...|
+--------+-------------------------+-------------------------+--------+--------+